package ynu.sxp.demoapp.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import ynu.sxp.demoapp.entity.Cart;

import java.util.List;
import java.util.UUID;

@Repository
public interface CartRepository extends JpaRepository<Cart, UUID> {
    List<Cart> findByUserId(String userId);
    Cart findByUserIdAndBusinessIdAndFoodId(String userId, Integer businessId, Integer foodId);
    List<Cart> findByUserIdAndBusinessId(String userId, Integer businessId);
}